<?php

echo $this->Html->link('Listado Beneficiarios', array('controller' => 'PlotPolls', 'action' => 'print_list'), array('target' => '_blank', 'class' => 'acciones', 'indicator' => 'loading')) ?>

<?php if($this->Session->read('bloqueado')!=1):
    ?>
<h2>Este proyecto aún no tiene calificación cumple, por tal razón no es posible cargar los datos del seguimiento</h2>
<?php endif;?>
<div class="paging">
    <?php
    echo $this->Paginator->options(array('update' => '#content', 'evalScripts' => false));
    echo $this->Paginator->prev('< ' . __('Anterior'), array(), null, array('class' => 'prev disabled'));
    echo $this->Paginator->numbers(array('separator' => ''));
    echo $this->Paginator->next(__('Siguiente') . ' >', array(), null, array('class' => 'next disabled'));
    ?>
</div>
<table>
    <thead>
        <tr>
            <th><?php echo $this->Paginator->sort('Follow.id', 'Id'); ?></th>
            <th><?php echo $this->Paginator->sort('Follow.observaciones', 'Observaciones'); ?></th>
            <th></th>
            <th></th>
            <th></th>
            <th></th>
            <th></th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        <?php foreach ($Follows as $Follow): ?>
        <tr>
            <td><?php echo $Follow['Follow']['id']; ?></td>
            <td><?php echo $Follow['Follow']['observaciones']; ?></td>
            <td><?php echo $this->Ajax->link('Plan de inversión', array('controller' => 'Budgets', 'action' => 'index', $Follow["Follow"]["id"]), array('update' => 'content', 'indicator' => 'loading', 'class' => 'acciones')); ?></td>
            <td><?php echo $this->Ajax->link('Lineas productivas', array('controller' => 'FollowProducts', 'action' => 'index', $Follow["Follow"]["id"]), array('update' => 'content', 'indicator' => 'loading', 'class' => 'acciones')); ?></td>
            <td><?php echo $this->Ajax->link('Comités de compras', array('controller' => 'Committees', 'action' => 'index', $Follow["Follow"]["id"]), array('update' => 'content', 'indicator' => 'loading', 'class' => 'acciones')); ?></td>
            <td><?php echo $this->Ajax->link('Visitas', array('controller' => 'Visits', 'action' => 'index', $Follow["Follow"]["id"]), array('update' => 'content', 'indicator' => 'loading', 'class' => 'acciones')); ?></td>
            <td><?php echo $this->Ajax->link('Editar', array('controller' => 'Follows', 'action' => 'edit', $Follow["Follow"]["id"]), array('update' => 'content', 'class' => 'acciones', 'indicator' => 'loading', 'complete' => 'formularioAjax()')); ?></td>
            <td><?php echo $this->Ajax->link('Eliminar', array('controller' => 'Follows', 'action' => 'delete', $Follow["Follow"]["id"], $proyect_id), array('update' => 'content', 'indicator' => 'loading', 'class' => 'acciones'), '¿Realmente desea borrar el registro?'); ?></td>
        </tr>
        <?php endforeach; ?>
    </tbody>
</table>

<?php echo $this->Js->writeBuffer(); ?>

<?php if($this->Session->read('bloqueado')==1) echo $this->Ajax->link('Adicionar', array('controller' => 'Follows', 'action' => 'add', $proyect_id), array('update' => 'content', 'class' => 'acciones', 'indicator' => 'loading'), '¿Desea adicionar un nuevo registro?') ?>

